package day02;

/**
 * @author Jetwang
 * @version 1.0
 * @since 2023/3/12 9:57
 * 打印从1到最大的n位数
 */
public class Offer17 {
    public int[] printNumbers(int n) {
        int len = 0;
        for (int i = 0; i < n; i++) {
            len *= 10;
        }
        int[] arr = new int[len - 1];

        for (int i = 1; i < len - 1; i++) {
            arr[i] = i;
        }
        return arr;
    }
}
